import request from '@/utils/request'

export function getUserList(current,size,userVO) {
  return request({
    url: '/user/getUsers',
    method: 'post',
    params: {
      current,
      size
    },
    data: userVO
  })
}

export function deleteAvater(file) {
  return request({
    url: '/deleteImgFile',
    method: 'post',
    params: {
      file
    }
  })
}

export function exportExcel(userVO) {
  return request({
    url: '/user/export',
    method: 'post',
    data: userVO,
    responseType: 'blob'   //指定响应的数据类型为二进制文件
  })
}

export function login(username,password) {
  return request({
    url: '/user/login',
    method: 'post',
    params: {
      username,
      password
    }
  })
}